package com.xin.di.uav.common.enums;

/**
 * @author LTQ
 */
public enum EjectFrequencyEnum {
    /**
     *
     */

    ONCE(1, "仅一次"),
    EVERY_TIME(2, "每次进入弹出"),
    EVERY_FEW_DAYS(3, "每隔n天弹出");


    private Integer code;
    private String name;

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    EjectFrequencyEnum(Integer code, String name) {
        this.code = code;
        this.name = name;
    }

    public static String getName(Integer value) {
        for (EjectFrequencyEnum ele : values()) {
            if (ele.getCode().equals(value)) {
                return ele.getName();
            }
        }
        return null;
    }
}
